
<volist name="list" id="vo">
  <div class="media blog-cmnt" id="blog-cmnt-{$vo.id}"> <a href="javascript:;" class="pull-left"> <img alt="" src="<empty name="vo['headimg']">__PUBLIC__/timg.jpg<else/>{$vo.headimg}</empty>" class="media-object-child"> </a>
    <div class="media-body">
      <h4 class="media-heading"> <p contenteditable="false" class="mp-less emojitext" readonly><a href="#">{$vo.membername}</a> 回复 <a href="##">{$vo.tomembername}</a> ： {:outemoji($vo['remark'])}</p> </h4>
      <div class="bl-status"> <span class="pull-left">{:getEvaluateTime($vo['datetime'])}</span> 

&nbsp;&nbsp;

<a href="javascript:void(0);" id="p-text-area-btn-{$vo.id}" title="回复"><i class="fa icon-comments-o"></i></a>&nbsp;&nbsp;&nbsp;<eq name="vo['member_id']" value="$memberInfo['id']"><a id="blog-cmnt-{$vo.id}del" href="##">删除</a></eq></div>
      
      
      
      <form style="position:relative;display:none;" action="{:U('Info/insert')}" class="p-text-area{$vo.id}" id="p-text-area{$vo.id}" onSubmit="return false;">
                                <input type="hidden" name="pid" value="{$vo.id}">
                                
                                
                                <p class="lead emoji-picker-container" style="margin-bottom:0;">
                                <textarea class="form-control textarea-control" rows="2" placeholder="发表评论" data-emojiable="true" name="remark"></textarea>
                            </p>
                                
                                   
                                    
                                    
                                    
                                    
                                     <button onClick="submitform{$vo.id}();" class="btn btn-post btn-sm pull-right" style="border:none; border-radius:0;">发表</button> <a href="javascript:void(0);" onClick="$('#p-text-area{$vo.id}').hide();" style=" border:none; border-radius:0; margin-right:10px;" class="btn btn-default pull-right btn-sm">取消</a> 
                                    <div class="clearfix"></div>
                                </form>
      
      <script>
	  
	  $('#blog-cmnt-{$vo.id}del').click(function(e) {
        
		
		
		
		art.dialog.confirm('您确定要删除当前记录吗？', function(){
			$.get('{:U('delete', array('id' => $vo['id']))}', {}, function(data){
				if(data.status == 1){
					$('#blog-cmnt-<php>echo $vo['id'];</php>').remove();
					$.ThinkBox.success(data.info,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
				}else{
					alert(data.info);
				}
			}, 'json');
		}, function(){});
		
		
		
		
		
		
		
		
		
    });
	  
	  
	  
	  
	  $('#p-text-area-btn-{$vo.id}').click(function(e) {
       if($('#p-text-area{$vo.id}').css('display') == 'none'){
		   $('#p-text-area{$vo.id}').show();
		  }else{
			  $('#p-text-area{$vo.id}').hide(100);
			 }
    });
                                        function submitform{$vo.id}(){
											
                                            
											var data = $('.p-text-area{$vo.id}').eq(0).serialize();
											$.ajax({
												url : $('.p-text-area{$vo.id}').eq(0).attr('action'),
												data:data,
												type:'POST',
												dataType:"json",
												success: function(data){
													$('.p-text-area{$vo.id}').eq(0).find('[name="remark"]').val('');
													$('.p-text-area{$vo.id}').eq(0).find('[name="remark"]').next('div').html('');
													if(data.status == 1){
														$('#blog-cmnt-box-{$vo.id}form').trigger('submit');
														$('#p-text-area{$vo.id}').hide(100);
														
														
														$.ThinkBox.success(data.info,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
														
													}else{
													    alert(data.info);
													}
												}
											});
										}
                                    </script>
      
      
      
      
      <div class="" id="blog-cmnt-box-{$vo.id}"><!--sub#{$vo.id}--></div>
      <form action="{:U('Info/cmntList', array('pid'=> $vo['id']))}" id="blog-cmnt-box-{$vo.id}form"></form>
      <div id="blog-cmnt-box-{$vo.id}pages"></div>
      
      <script>
         $('#blog-cmnt-box-{$vo.id}').ajaxlist({append:true, nodata:'<p style="text-align:center">暂无评论</p>',loadmore:'<a href="#link#">点击查看更多评论</a>',loadmorenodata:'<p style="color:#ccc;">已经显示所有评论</p>',autoload:0, success:function(){
			 $('.emojitext').each(function(index, element) {
					$(this).remove('emojitext');
                    $(this).html(window.emojiPicker.unicodeToImage($(this).html()));
                });
				//评论加载完之后转换表情符号
				window.emojiPicker.discover(); 
		 }});
      </script>
    </div>
  </div>
</volist>
